import request, { singleRequest } from '@/utils/request'
import { cloneDeep } from 'lodash'

// 订单列表
export const orderList = async (data = {}) => {
    const res = await singleRequest({
        url: '/order/list',
        method: 'post',
        data,
    })
    return res
}

// 订单详情
export const orderDetail = async (data = {}) => {
    const res = await singleRequest({
        url: '/order/orderDetail',
        method: 'get',
        params:data,
    })
    return res
}


// 修改订单金额
export const changePrice = async (data = {}) => {
    data = cloneDeep(data)
    data.payPrice = data.payPrice * 100
    const res = await request({
        url: '/order/changePrice',
        method: 'post',
        data,
    })
    return res
}

// 线下支付审核
export const payAudit = async (data = {}) => {
    data = cloneDeep(data)
    const res = await request({
        url: '/order/payCheck',
        method: 'post',
        data,
    })
    return res
}
